/PROG  PNS0053
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53102746C";
PROG_SIZE	= 3298;
CREATE		= DATE 15-07-22  TIME 09:37:12;
MODIFIED	= DATE 20-02-18  TIME 15:49:36;
FILE_NAME	= PNS0016;
VERSION		= 0;
LINE_COUNT	= 115;
MEMORY_SIZE	= 3774;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0053 ;
   7:  !  PART:  ;
   8:  !*HL_20150722******************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  R[5:SPEED           ]=10    ;
  24:  OVERRIDE=R[5:SPEED           ] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:   ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED           ] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  TIMER[3]=START ;
  54:  R[5:SPEED           ]=100    ;
  55:  OVERRIDE=R[5:SPEED           ] ;
  56:J P[3:PICK APPROACH] 100% CNT60 ACC100    ;
  57:J P[4:PICK] 100% CNT5 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  58:  PAYLOAD[2] ;
  59:  CALL CHK_PICK    ;
  60:  MONITOR Z_CHECH ;
  61:L P[5:PICK DEPART] 2000mm/sec CNT40 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  62:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  63:  LBL[27] ;
  64:  CALL CHECKPICK    ;
  65:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  66:J P[7:PICK CLEAR] 100% CNT100 ACC110    ;
  67:  LBL[30:GOTO DROP POUNCE] ;
  68:J P[8:DROP POUNCE] 100% CNT100 ACC80    ;
  69:   ;
  70:  TIMER[3]=STOP ;
  71:  LBL[40:AT DROP POUNCE] ;
  72:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  73:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  74:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  75:  JMP LBL[40] ;
  76:   ;
  77:  LBL[50:MOVE DROP SNEAK] ;
  78:  TIMER[3]=START ;
  79:  OVERRIDE=R[5:SPEED           ] ;
  80:J P[9:DROP SNEAK] 100% CNT100 ACC80    ;
  81:  LBL[51:DROP OR C-P-S] ;
  82:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  83:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  84:  JMP LBL[51] ;
  85:  JMP LBL[50] ;
  86:   ;
  87:  LBL[60:MOVE CLS-PRS-ACC] ;
  88:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  89:  PAUSE ;
  90:  JMP LBL[30] ;
  91:   ;
  92:  LBL[80:DROP ENABLED] ;
  93:  TIMER[3]=START ;
  94:  !PROCEED TO DROP ;
  95:  OVERRIDE=R[5:SPEED           ] ;
  96:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
  97:  MONITOR END Z_CHECH ;
  98:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
  99:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 100:  PAYLOAD[1] ;
 101:J P[12:DROP DEPART] 100% CNT100 ACC130 TA    .01sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 102:  CALL CHK_DROP    ;
 103:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 104:  !GOTO PICK POUNCE ;
 105:J P[2:PICK POUNCE] 100% CNT100 ACC110 BREAK    ;
 106:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 107:  JMP LBL[10] ;
 108:   ;
 109:  LBL[90:END OF CYCLE] ;
 110:  TIMER[1]=STOP ;
 111:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 112:J P[1:MIDDLE] 50% CNT100 ACC150    ;
 113:  MOVE TO HOME    ;
 114:   ;
 115:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1986.203  mm,	Y =    -8.098  mm,	Z = -1015.219  mm,
	W =  -179.183 deg,	P =     1.681 deg,	R =  -179.587 deg,
	E1=   104.349 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2149.397  mm,	Y =  1662.776  mm,	Z =  -976.009  mm,
	W =   179.240 deg,	P =      .151 deg,	R =   142.400 deg,
	E1=   141.976 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2656.573  mm,	Y =  3248.677  mm,	Z = -1056.079  mm,
	W =  -178.356 deg,	P =    -1.270 deg,	R =    90.797 deg,
	E1=   193.149 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2656.573  mm,	Y =  3248.676  mm,	Z = -1167.439  mm,
	W =  -178.356 deg,	P =    -1.270 deg,	R =    90.797 deg,
	E1=   193.149 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2656.572  mm,	Y =  3248.676  mm,	Z =  -936.879  mm,
	W =  -178.356 deg,	P =    -1.270 deg,	R =    90.797 deg,
	E1=   193.149 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2197.180  mm,	Y =  1632.055  mm,	Z =  -993.259  mm,
	W =   179.278 deg,	P =      .767 deg,	R =   141.490 deg,
	E1=   142.678 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.562  mm,	Y = -1162.722  mm,	Z = -1106.199  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2327.830  mm,	Y = -2452.202  mm,	Z = -1086.694  mm,
	W =  -178.603 deg,	P =     -.846 deg,	R =  -123.674 deg,
	E1=    47.905 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2705.402  mm,	Y = -3251.957  mm,	Z = -1098.410  mm,
	W =   178.299 deg,	P =    -1.304 deg,	R =   -90.989 deg,
	E1=    15.327 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2705.401  mm,	Y = -3251.957  mm,	Z = -1269.931  mm,
	W =   178.299 deg,	P =    -1.304 deg,	R =   -90.989 deg,
	E1=    15.327 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2705.401  mm,	Y = -3251.957  mm,	Z = -1148.330  mm,
	W =   178.299 deg,	P =    -1.304 deg,	R =   -90.989 deg,
	E1=    15.327 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2185.471  mm,	Y = -1294.364  mm,	Z = -1153.638  mm,
	W =  -178.716 deg,	P =      .216 deg,	R =  -148.635 deg,
	E1=    72.960 deg
};
/END
